package com.knife.hospital.util.user;

import com.knife.hospital.entity.UserPO;

import com.knife.hospital.model.user.UserLoginResponse;
import org.springframework.stereotype.Component;


/**
 * @author Zhenghao Ji
 */
@Component
public class UserLoginUtil {
    public UserLoginResponse userPoToUserResponse(UserPO userPO) {
        UserLoginResponse userLoginResponse = new UserLoginResponse();
        userLoginResponse.setId(userPO.getId());
        userLoginResponse.setType(userPO.getType());
        userLoginResponse.setReserved(userPO.getReserved());
        userLoginResponse.setState(userPO.getState());
        userLoginResponse.setNickname(userPO.getNickname());
        return userLoginResponse;
    }

}